package cn.xkshow.core.authorization.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "qx_user")
public class User implements java.io.Serializable {

	// Fields

	private Integer id;
	private String uname;
	private String email;
	private String password;
	private Date registerTime;
	private String registerIp;
	private Date lastLoginTime;
	private String lastLoginIp;
	private String resetKey;
	private String resetPwd;
	private Integer countLogin;
	private Integer countFail;
	private Integer flags;
	private Date starTime;
	private Date endTime;
	private String createuname;

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String uname, String password, Date registerTime,
			String registerIp, Date lastLoginTime, String lastLoginIp,
			Integer countLogin, Integer countFail, Integer flags) {
		this.uname = uname;
		this.password = password;
		this.registerTime = registerTime;
		this.registerIp = registerIp;
		this.lastLoginTime = lastLoginTime;
		this.lastLoginIp = lastLoginIp;
		this.countLogin = countLogin;
		this.countFail = countFail;
		this.flags = flags;
	}

	/** full constructor */
	public User(String uname, String email, String password,
			Date registerTime, String registerIp, Date lastLoginTime,
			String lastLoginIp, String resetKey, String resetPwd,
			Integer countLogin, Integer countFail, Integer flags,
			Date starTime, Date endTime, String createuname) {
		this.uname = uname;
		this.email = email;
		this.password = password;
		this.registerTime = registerTime;
		this.registerIp = registerIp;
		this.lastLoginTime = lastLoginTime;
		this.lastLoginIp = lastLoginIp;
		this.resetKey = resetKey;
		this.resetPwd = resetPwd;
		this.countLogin = countLogin;
		this.countFail = countFail;
		this.flags = flags;
		this.starTime = starTime;
		this.endTime = endTime;
		this.createuname = createuname;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "uname", nullable = false)
	public String getUname() {
		return this.uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	@Column(name = "email")
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "password", nullable = false, length = 128)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "register_time", nullable = false, length = 19)
	public Date getRegisterTime() {
		return this.registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	@Column(name = "register_ip", nullable = false, length = 100)
	public String getRegisterIp() {
		return this.registerIp;
	}

	public void setRegisterIp(String registerIp) {
		this.registerIp = registerIp;
	}

	@Column(name = "last_login_time", nullable = false, length = 19)
	public Date getLastLoginTime() {
		return this.lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	@Column(name = "last_login_ip", nullable = false, length = 100)
	public String getLastLoginIp() {
		return this.lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	@Column(name = "reset_key")
	public String getResetKey() {
		return this.resetKey;
	}

	public void setResetKey(String resetKey) {
		this.resetKey = resetKey;
	}

	@Column(name = "reset_pwd")
	public String getResetPwd() {
		return this.resetPwd;
	}

	public void setResetPwd(String resetPwd) {
		this.resetPwd = resetPwd;
	}

	@Column(name = "count_login", nullable = false)
	public Integer getCountLogin() {
		return this.countLogin;
	}

	public void setCountLogin(Integer countLogin) {
		this.countLogin = countLogin;
	}

	@Column(name = "count_fail", nullable = false)
	public Integer getCountFail() {
		return this.countFail;
	}

	public void setCountFail(Integer countFail) {
		this.countFail = countFail;
	}

	@Column(name = "flags", nullable = false)
	public Integer getFlags() {
		return this.flags;
	}

	public void setFlags(Integer flags) {
		this.flags = flags;
	}

	@Column(name = "star_time", length = 19)
	public Date getStarTime() {
		return this.starTime;
	}

	public void setStarTime(Date starTime) {
		this.starTime = starTime;
	}

	@Column(name = "end_time", length = 19)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Column(name = "createuname")
	public String getCreateuname() {
		return this.createuname;
	}

	public void setCreateuname(String createuname) {
		this.createuname = createuname;
	}

}